package com.wcar.vipmanagement.feign.factory;

import com.wcar.common.entity.User;
import com.wcar.common.vo.Result;
import com.wcar.vipmanagement.feign.UserFeign;
import feign.hystrix.FallbackFactory;

public class UserFeignFactory implements FallbackFactory<UserFeign> {
    @Override
    public UserFeign create(Throwable throwable) {
        return new UserFeign() {
            @Override
            public Result<User> selectById(Integer id) {
                return new Result<User>(500, throwable.getMessage(), null);
            }
        };
    }
}
